Skip to content

cap: add X2ApicApi capability. #333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

posk-io
Copy link

@posk-io posk-io commented Jul 16, 2025

The capability is used to program/remap MSI IRQ routing to vCPUs with IDs larger than 255.

Summary of the PR

I'm working on a PR to Cloud Hypervisor to allow it to run VMs with more than 256 vCPUs. KVM on x86_64 needs KVM_CAP_X2APIC_API capability to properly route IRQs to CPUs with APIC IDs larger than 255; as Cloud Hypvervisor depends on this crate for KVM capability management, this small change is needed to avoid ugly workarounds.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • [-] All added/changed functionality has a corresponding unit/integration
    test:
    • This is just plumbing through a constant generated from a C header file; there are no functional changes.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • [N/A] Any newly added unsafe code is properly documented.

The capability is used to program/remap MSI IRQ routing to vCPUs
with IDs larger than 255.

Signed-off-by: Peter Oskolkov <posk@google.com>
@roypat
Copy link
Member

roypat commented Jul 17, 2025

Let us know if you'll also new a patch release of kvm-ioctls to use this in cloud hypervisor :)

@posk-io
Copy link
Author

posk-io commented Jul 17, 2025

Let us know if you'll also new a patch release of kvm-ioctls to use this in cloud hypervisor :)

Cloud Hypervisor depends on kvm-ioctls both directly and indirectly through vfio-ioctls. I think releasing just kvm-ioctls may not be enough...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants